<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>&nbsp;</title>
    </head>
    <body>
        <#if keyvalue??>
        <form id="fm" method="post" action="sys/keyvalue/update">
        <#else>
        <form id="fm" method="post" action="sys/keyvalue/add">
        </#if>
            <div style="margin-bottom:20px">
                    <input class="easyui-textbox" name="title" style="width:100%" value="${(keyvalue.title)!}" data-options="label:'名称:',required:true">
            </div>
            <div style="margin-bottom:20px">
                  <input class="easyui-textbox" name="key" style="width:100%" value="${(keyvalue.key)!}" data-options="label:'键:',required:true,editable:false">
            </div>
            
            <div style="margin-bottom:20px">
                <input class="easyui-textbox" name="value" style="width:100%;height:60px" value="${(keyvalue.value)!}" data-options="label:'值:',multiline:true">
            </div>
        </form>
        <div style="text-align:center;padding:5px">
            <a href="javascript:void(0)" class="easyui-linkbutton" onclick="submitForm()" style="width:80px">保存</a>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <#if keyvalue??>
                <a href="javascript:void(0)" class="easyui-linkbutton" onclick="closeForm()" style="width:80px">关闭</a>
            <#else>
                <a href="javascript:void(0)" class="easyui-linkbutton" onclick="clearForm()" style="width:80px">重置</a>
            </#if>
        </div>
       
       <script type="text/javascript">
            function submitForm(){
                $('#fm').form('submit',{
                	success:function(){
                		$('#form').dialog('close');
                	}
                });
            }
            function clearForm(){
                $('#fm').form('clear');
            }
            function closeForm(){
            	$('#form').dialog('close');
            }
       </script>
    </body>
     
</html>